package com.qin.mall.openfeign.order;

import com.qin.mall.common.api.CommonResult;
import com.qin.mall.common.api.MyBatisPlusPage;
import com.qin.mall.domain.OmsOrder;
import com.qin.mall.dto.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author Leisure
 * create 2022 2022/11/22 8:38
 **/
@FeignClient("order-manage")
public interface OmsOrderFeigin {


    /**
     * 条件查询订单并分页
     */
    @PostMapping("/omsorder/listQuery")
    @ResponseBody
    public CommonResult<MyBatisPlusPage<OmsOrder>> listQuery(@RequestParam(value = "pageNum",defaultValue = "1") Integer pageNum,
                            @RequestParam(value = "pageSize",defaultValue = "5") Integer pageSize,
                             OmsOrderQueryParam queryParam);

    /**
     * 批量发货
     */
    @PostMapping("/omsorder/update/delivery")
    public CommonResult delivery(@RequestBody List<OmsOrderDeliveryParam> deliveryParamList);
    
    /**
     *  批量关闭订单
     */
    @PostMapping("/omsorder/update/close")
    public CommonResult close(@RequestParam("note") String note,
                              @RequestParam("ids") List<Long> ids);

    /**
     * 批量删除订单
     */
    @PostMapping("/omsorder/delete")
    public CommonResult delete(@RequestParam("ids") List<Long> ids);

    /**
     * 获取指定订单详情
     */
    @PostMapping("/omsorder/{id}")
    @ResponseBody
    public CommonResult<OmsOrderDetail> detail(@PathVariable Long id);

    /**
     * 修改订单收货人信息
     */
    @PostMapping("/omsorder/update/receiverInfo")
    public Object updateReceiverInfo(@RequestBody OmsReceiverInfoParam receiverInfoParam);

    /**
     * 修改订单费用信息
     */
    @PostMapping("/omsorder/update/moneyInfo")
    public Object updateReceiverInfo(@RequestBody OmsMoneyInfoParam moneyInfoParam);

    /**
     * 修改订单备注 
     */
    @PostMapping("/omsorder/update/note")
    public CommonResult updateNote(@RequestParam("id") Long id,
                             @RequestParam("note") String note,
                             @RequestParam("status") Integer status);
    
    
}
